1. Field
The present disclosure concerns a process for acquisition of data of a counting device measuring pulses delivered by a sensor, and extends to a device designed for the implementation of such a process.
2. Description of Related Prior Art
Counting devices associated with sensors delivering a train of pulses can be used to obtain information on a mobile unit such as the position of the mobile unit and/or its speed and/or its acceleration by measuring the number of pulses that are output by the sensor and/or it can also be used to count the number of pulses delivered by the sensors. A sensor delivering a train of pulses can be an optical sensor, an inductive sensor, a Hall sensor etc. For example, a rotary encoder is a device including a graduated mobile disc exhibiting a certain resolution and coupled to a rotating shaft. In this case the graduations of the disc can be read by means of an optical transmission module and an optical reception module, said modules being fixed on either side of the disc. The rotation of the disc then generates zones of shadow or of light on the receiver. These two states of the receiver—shaded or illuminated—can be converted into a train of pulses. The rotary encoder increments a counter upon each pulse detected, in order to output an item of angle information. Other types of counting devices can also be used for linear encoders and angular encoders for toothed wheels. A linear encoder measures the displacement of a body in a rectilinear direction. The angular encoder for toothed wheels also enables an item of angle information to be output by counting the number of teeth and of spaces of the toothed wheel that have been detected by the sensor of the encoder, in order to know the rotation executed about a shaft.
An item of speed information of a mobile unit can be deduced by measuring the frequency of the various changes of state of the sensor of the encoder.
A process for acquisition of data of a counting device consists in sampling the data of a counting device according to a required frequency, and in carrying out, if need be, a subsequent processing of these data. The data of the counting device that have been acquired in this way are digital values, named values of the counting device.
U.S. Pat. No. 8,176,351 describes a sampling process for counting devices for data acquisition. At least one counter enables the number of pulses of the train of pulses that are output by the sensor to be counted, and is able to record these values in a memory. The values acquired by the counter may represent indications of position of a mobile unit if the input signal stems from a sensor of a rotary encoder, for example.
This acquisition process has several drawbacks. On account of the fact that the train of pulses emitted by the sensor indicates a state in which the sensor is to be found (for example, shaded or illuminated), only the edges of the pulses, representing a change of state, designate an exact position. In consequence, to obtain precise measurements it is necessary to use a high-frequency sampling clock to detect these changes of state and, consequently, a change of value of the counting device. Now, the use of a high-frequency sampling clock is costly, because it involves a high CPU load and recording a large amount of data.
In order to lessen this cost, it is possible to reduce the sampling frequency. But this solution leads to a lag in relation to the change of value of the counting device. The acquired data are therefore not synchronized with the counting device.
Since the train of pulses produces a temporal discretisation, a pulse being representative only of a time-interval in the course of which the sensor is maintained in one state (shaded or illuminated, for example), it may also be useful to estimate the exact positioning of the mobile unit. To do this, a step of adjustment of the values of the counting device that have been read may be provided. In this way, successive repeated values of the counting device that are due to the absence of a change of state are adjusted by linear interpolation, using the read value that is representative of the change of state of the sensor preceding the value having to be adjusted and the read value that is representative of the change of state of the sensor following the value having to be adjusted. However, this calculation may be based on read values that themselves have been falsified by the sampling frequency. In consequence, the results of this approximation are not representative of the instantaneous real positioning of the mobile unit.